import random

class DatasetGenerator:
    def generate(self, size):
        """生成随机数据"""
        return [random.randint(1, size * 10) for _ in range(size)]

    def generate_sorted(self, size):
        """生成已排序数据"""
        return list(range(1, size + 1))

    def generate_reversed(self, size):
        """生成逆序数据"""
        return list(range(size, 0, -1))

    def generate_partially_sorted(self, size):
        """生成部分有序数据"""
        arr = list(range(1, size + 1))
        for i in range(0, size, max(1, size // 10)):
            if i + 1 < size:
                arr[i], arr[i + 1] = arr[i + 1], arr[i]
        return arr
